﻿using BCCommon.TMS.Invoice;
using BCEntity.TMS.User.UserInvoiceThin;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BCData.TMS.User.UserInvoiceThin
{
    /// <summary>
    /// 用户发票薄
    /// </summary>
    public interface IUserInvoiceThinData
    {
        /// <summary>
        /// 添加用户发票薄
        /// </summary>
        /// <param name="entity">用户发票薄信息</param>
        /// <returns></returns>
        Task<UserInvoiceThinEntity> Insert(UserInvoiceThinEntity entity);

        /// <summary>
        /// 获取用户发票薄
        /// </summary>
        /// <param name="userInvoiceThinId">用户发票薄Id</param>
        /// <returns></returns>
        Task<UserInvoiceThinEntity> GetEntity(long userInvoiceThinId);

        /// <summary>
        /// 修改用户发票薄
        /// </summary>
        /// <param name="entity">用户发票薄信息</param>
        /// <returns></returns>
        Task<UserInvoiceThinEntity> Update(UserInvoiceThinEntity entity);

        /// <summary>
        /// 删除用户发票薄
        /// </summary>
        /// <param name="userInvoiceThinId">用户发票薄Id</param>
        /// <returns></returns>
        Task<int> Delete(long userInvoiceThinId);

        /// <summary>
        /// 获取用户发票薄
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="invoiceTitleType">发票抬头类型</param>
        /// <param name="pageIndex">页号</param>
        /// <param name="pageSize">每页数据条数</param>
        /// <returns></returns>
        Task<(IEnumerable<UserInvoiceThinEntity>, int)> Query(long userId, InvoiceTitleType? invoiceTitleType, int pageIndex, int pageSize);

        /// <summary>
        /// 获取用户发票薄列表
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="invoiceTitleType">发票抬头类型</param>
        /// <returns></returns>
        Task<IEnumerable<UserInvoiceThinEntity>> GetList(long userId, InvoiceTitleType? invoiceTitleType);
    }
}
